﻿



goog.provide('ol.dmp.interactionGeometry.Point');


goog.require('ol.dmp.interactionGeometry.Base');


ol.dmp.interactionGeometry.Point = function (options)
{
    goog.base(this, options);
}

goog.inherits(ol.dmp.interactionGeometry.Point, ol.dmp.interactionGeometry.Base);






ol.dmp.interactionGeometry.Point.prototype.atFinish = function (event)
{
    return true;
};

ol.dmp.interactionGeometry.Point.prototype.startDrawing = function (event)
{
    var start = event.coordinate;
    this.finishCoordinate_ = start;
    var geometry = new ol.geom.Point(start.slice());
    this.sketchFeature_ = new ol.Feature();
    this.sketchFeature_.setGeometry(geometry);
};

ol.dmp.interactionGeometry.Point.prototype.modifyDrawing = function (event)
{
    var coordinate = event.coordinate;
    var geometry = this.sketchFeature_.getGeometry();
    var coordinates, last;
    last = geometry.getCoordinates();
    last[0] = coordinate[0];
    last[1] = coordinate[1];
    geometry.setCoordinates(last);

};

ol.dmp.interactionGeometry.Point.prototype.finishDrawing = function (event)
{
    var coordinates = event.coordinate.slice();
    this.sketchFeature_ = new ol.Feature(new ol.geom.Point(coordinates));
};


